package com.wallet.provider.mapper;

import com.github.pagehelper.Page;

import com.wallet.provider.model.Role;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    /**
     * 分页查询角色
     * @param keywords
     * @param pageNum
     * @param pageSize
     * @param orderName
     * @param orderType
     * @return
     */
    Page<Role> selectByPageNumSize(@Param("keywords") String keywords, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize, @Param("orderName") String orderName, @Param("orderType") String orderType);

    /**
     * 根据id删除角色
     * @param ids
     * @return
     */
    int deleteByIds(@Param("ids") String ids);

    Page<Role> getAllRoleList();
}